package com.example.springboot;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
public class HelloController {

    @Value("${spring.value}")
    String string;

    @Autowired
    private DiscoveryClient client;

    @RequestMapping("/hello")
    public String hello(){

        return string+ new Date().getTime()+client.getServices();
    }
}
